package ink.xiaobaibai.common.delay;

import java.util.Date;

/**
 * @description: 优惠券检查状态的延时item
 * @author: 小白白
 * @create: 2021-06-06
 **/

public class DelayItemByCoupon extends DeviceDelayItem {

    private Integer couponId;
    private Integer couponUserId;
    private String orderId;
    private String couponCode;

    public DelayItemByCoupon(Integer couponId, Integer couponUserId, String orderId, Date expiredTime) {
        super(null, expiredTime);
        this.couponId = couponId;
        this.couponUserId = couponUserId;
        this.orderId = orderId;
    }

    public Integer getCouponUserId() {
        return this.couponUserId;
    }

    public String getOrderId() {
        return this.orderId;
    }

    public Integer getCouponId() {
        return this.couponId;
    }

    public String getCouponCode() {
        return this.couponCode;
    }

    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    @Override
    public int hashCode() {
        return this.orderId.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return this.orderId.equals(((DelayItemByCoupon) obj).orderId);
    }


}
